  /**
   * Generate time : 2012-11-19 15:45:03
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiBlockMeta;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZM97
 * table comment : 材料消耗
 */
public class ZM97 extends DaoEPBase {

	private String departmentName = " ";		/* FD_KEY_ID*/
	private String intialNation = " ";		/* 问题类型ID*/
	private String SUM = " ";		/* 问题级别ID*/
	
	/**
	 * initialize the metadata 
	 */
	public void  initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("departmentName");
		eiColumn.setType("C");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("部门");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("intialNation");
		eiColumn.setType("N");
		eiColumn.setDescName("初始额度");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("SUM");
		eiColumn.setType("N");
		eiColumn.setDescName("消耗量");
		eiMetadata.addMeta(eiColumn);
	}
	/**
	 * the constructor
	 */
	public ZM97() {
		initMetaData();
	}
	
	/**
	 * get the departmentName-部门
	 * @return the departmentName
	 */
	public String getdepartmentName() {
		return this.departmentName;
	}
	
	/**
	 * set the departmentName - 部门
	 */
	public void setdepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}
	
	/**
	 * get the intialNation - 初始额度
	 * @return the intialNation
	 */
	public String getintialNation() {
		return this.intialNation;
	}
	
	/**
	 * set the intialNation - 初始额度
	 */
	public void setintialNation(String intialNation) {
		this.intialNation = intialNation;
	}
	
	/**
	 * get the SUM - 消耗量
	 * @return the SUM
	 */
	public String getSUM() {
		return this.SUM;
	}
	
	/**
	 * set the SUM - 消耗量
	 */
	public void setSUM(String SUM) {
		this.SUM = SUM;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setdepartmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("departmentName")), departmentName));
		setintialNation(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("intialNation")), intialNation));
		setSUM(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("SUM")), SUM));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("departmentName",StringUtils.toString(departmentName, eiMetadata.getMeta("departmentName")));	
			map.put("intialNation",StringUtils.toString(intialNation, eiMetadata.getMeta("intialNation")));	
			map.put("SUM",StringUtils.toString(SUM, eiMetadata.getMeta("SUM")));	
			
		return map;
	
	}
}